package db;
import java.sql.* ;
import java.util.*;


public class dbconnection {

	String pwd = "";
	String usr = "";
	String url = "";
	Connection db_connection ;	


   public dbconnection()
   {
	   try
	   {
		ResourceBundle bundle = ResourceBundle.getBundle("DBConnection");
		Class.forName(bundle.getString("Driver"));
   		this.url = bundle.getString("url");
   		this.usr = bundle.getString("usr");
   		this.pwd = bundle.getString("pwd");
   		this.db_connection = DriverManager.getConnection(this.url, this.usr, this.pwd);
      
   }
   catch(Exception ex)
   {  
	   System.out.println("r56_remonditeenus/db.dbconnection.dbconnection():" + ex.getMessage());
	   }
 	}


 public Connection getConnection() {

   
return this.db_connection;
}


 public void close() {

  try {

       this.db_connection.close();

         }
   
 catch(Exception ex)
    {

	 System.out.println("r56_remonditeenus/db.dbconnection.getConnection():" + ex.getMessage());

 }


}


public void finalize(){
   try
    {

     System.out.println("finalize");
    }
  catch(Exception ex)
   {  

      System.out.println("dbconn.finalize():" + ex.getMessage());
    }
}

}
